package com.swan.beans;

/**
 * Use on user status
 *
 * @See {@link UserBean#getStatus()}
 */
public enum StatusEnum {
    ENABLE(1), DISABLE(2);
    private int status;

    StatusEnum(int status) {
        this.status = status;
    }

    public int getStatus() {
        return status;
    }

    public static final StatusEnum get(int i) {
        for (StatusEnum status : StatusEnum.values()) {
            if (status.status == i) {
                return status;
            }
        }
        return null;
    }
}
